package order

import (
	"context"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
	pb "rpc/proto/order"
	"rpc/server"
)

type RetService struct {
	pb.UnimplementedOrderServer
}

func (s *RetService) CreateOrder(ctx context.Context, in *pb.CreateOrderReq) (*pb.CreateOrderResp, error) {
	_, err := server.CreateOrder(in)
	if err != nil {
		return nil, status.Errorf(codes.Unimplemented, "method GetOrder not implemented")
	}
	return &pb.CreateOrderResp{}, nil
}
func (s *RetService) GetOrder(ctx context.Context, in *pb.GetOrderReq) (*pb.GetOrderResp, error) {
	_, err := server.GetOrder(in)
	if err != nil {
		return nil, status.Errorf(codes.Unimplemented, "method GetOrder not implemented")
	}
	return &pb.GetOrderResp{}, nil
}
